/**
 * 
 */
package com.itinsys.enma.dao;

import java.sql.Date;
import java.sql.Time;
import java.util.List;

import com.itinsys.enma.domain.DailyReservation;
import com.itinsys.enma.domain.PlanningReservation;
import com.itinsys.enma.domain.Reservation;
import com.itinsys.enma.exception.reservation.ReservationExistsException;

/**
 * @author pferraz
 *
 */
public interface ReservationDAO {

	List<PlanningReservation> getAllPlanningReservaions() throws ReservationExistsException;

	PlanningReservation getById(long id) throws ReservationExistsException;

	boolean addPlanningReservation(PlanningReservation r);

	void updatePlanningReservation(PlanningReservation r) ;
	
	PlanningReservation getByEnvironmentId(int environment_Id);

	List<PlanningReservation> getByPlanningId(long id) throws ReservationExistsException;

	boolean deleteReservation(PlanningReservation r);

	DailyReservation getDailyByAllFields(String description,int envId, Date startDate,Date endDate, Time startTime, Time endTime);

	boolean deleteDailyReservation(DailyReservation r);

	void addDailyReservation(DailyReservation r);

	void updateDailyReservation(DailyReservation r);
	
	void updatePR(PlanningReservation p);

	List<DailyReservation> getDailyResByUser(String userName) throws ReservationExistsException;

	List<DailyReservation> getAllDailys() throws ReservationExistsException;

	DailyReservation getByOverlap(DailyReservation r) throws ReservationExistsException;

	List<PlanningReservation> getReservationsToStart(String date) throws ReservationExistsException;

	void directUpdate(Reservation r);

	List<PlanningReservation> getReservationsToEnd(String date) throws ReservationExistsException;

	boolean allReservationsDisable(int plannId);

	List<PlanningReservation> getPlanningReservationsByEnvAndDate(int environmentId, Date startDate, Date endDate);
	List<DailyReservation> getDailyReservationsByEnvAndDate(int environmentId, Date startDate, Date endDate);

	List<DailyReservation> getDailyResBetweenDatesByUser(String userName,Date startDate, Date endDate)throws ReservationExistsException;

	List<DailyReservation> getDailysBetweenDates(Date startDate, Date endDate)throws ReservationExistsException;

	



}
